<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="../vue.global.js"></script>
  <title>Document</title>
</head>
<body>
  <div id="root">
    <!-- {{count}}
    <div>
      <button @click="handleClick">add</button>
    </div> -->
    <my-title msg="hello world" @my-event="handleMyEvent">
      <div>hello</div>
      <template v-slot:abc>
        <div>
          hello slot
        </div>
      </template>
    </my-title>
  </div>
  <script type="module">
    const { createApp, h } = window.Vue
    // import useCount from './useCount.js'
    // import useTitle from './useTitle.js'

    import MyTitle from './title.js'
    
    const app = createApp({
      components: {
        MyTitle
      },

      // setup() {
      //   const { count, handleClick } = useCount()
      //   useTitle(count)

      //   return {
      //     count,
      //     handleClick
      //   }
      // }
      setup() {
        const handleMyEvent = () => {
          console.log(0)
        }

        return {
          handleMyEvent
        }
      }
    })

    let vm = app.mount('#root')
  </script>
</body>
</html>